//
//  TOSchoolCollectionCell.m
//  X-Tribe
//
//  Created by Miss.Ou on 16/3/30.
//  Copyright © 2016年 Miss.Ou. All rights reserved.
//

#import "TOSchoolCollectionCell.h"

@interface TOSchoolCollectionCell ()

@property (nonatomic,strong)UIImageView *coverImgView;

@property(nonatomic,strong)UILabel *timeLabel;

@property (nonatomic,strong)UILabel *joinLabel;
@property (nonatomic,strong)UILabel *likeLabel;

@end
@implementation TOSchoolCollectionCell

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self createSubViews];
    }
    return self;
}
- (void)createSubViews{
    
    
    
    self.coverImgView = [[UIImageView alloc] init];
    self.coverImgView.image = [UIImage imageNamed:@"cycle_image2.jpg"];
    [self.contentView addSubview:self.coverImgView];
    [self.coverImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.mas_equalTo(self.contentView);
        
        make.height.mas_equalTo(155 * HEIGHT);
        
        
    }];
    
    self.timeLabel = [[UILabel alloc] init];
    self.timeLabel.numberOfLines = 0;
    self.timeLabel.backgroundColor = [UIColor colorWithRed:1.00 green:0.79 blue:0.57 alpha:1.00];
    self.timeLabel.textAlignment = NSTextAlignmentCenter;
    self.timeLabel.font = [UIFont systemFontOfSize:16.0f * WIDTH];
    self.timeLabel.alpha = .95;
    [self.contentView addSubview:self.timeLabel];
    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(self.coverImgView);
        make.top.mas_equalTo(self.coverImgView.mas_bottom).offset(5);
        make.height.mas_equalTo(40*HEIGHT);
        
    }];
    
    _timeLabel.text = @"活动进行中...";
    
    self.joinLabel = [[UILabel alloc] init];
    self.joinLabel.textAlignment = NSTextAlignmentCenter;
    self.joinLabel.font = [UIFont systemFontOfSize:13.0f];
    self.joinLabel.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.joinLabel];
    
    [self.joinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.right.mas_equalTo(self.coverImgView.mas_right).offset(-10);
        make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(-10);
        make.height.mas_equalTo(25*WIDTH);
        make.width.mas_equalTo(60*HEIGHT);
    }];
    _joinLabel.text = @"😊 33";
    
    
    self.likeLabel = [[UILabel alloc] init];
    self.likeLabel.font = [UIFont systemFontOfSize:14.0f * WIDTH];
    self.likeLabel.textColor = [UIColor redColor];
    self.likeLabel.textAlignment = NSTextAlignmentCenter;
    self.likeLabel.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.likeLabel];
    [self.likeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.coverImgView.mas_left).offset(10);
        make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(-10);
        make.height.mas_equalTo(25*HEIGHT);
        make.width.mas_equalTo(70 * WIDTH);
    }];
    
    _likeLabel.text = @"❤️ 188";
    
    
    self.contentView.backgroundColor = [UIColor whiteColor];
    self.nameLabel = [[UILabel alloc] init];
    self.nameLabel.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:_nameLabel];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.mas_equalTo(self.contentView);
        make.height.mas_equalTo(50*HEIGHT);
        
    }];
    self.nameLabel.numberOfLines = 0;
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
    
    self.nameLabel.text = @"大连海洋大学.超级女声总决赛";
    
}


@end
